# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=endeavour
pkgver=43.0
pkgrel=2
pkgdesc="Personal task manager (Formerly GNOME Todo)"
url="https://wiki.gnome.org/Apps/Todo"
arch=(x86_64)
license=(GPL)
depends=(
  evolution-data-server
  gtk4
  libadwaita
  libpeas
  python
)
makedepends=(
  appstream-glib
  git
  gobject-introspection
  meson
  yelp-tools
)
provides=(gnome-todo)
replaces=("gnome-todo<=41.0+r106+gebc68374-1")
conflicts=("gnome-todo<=41.0+r106+gebc68374-1")
groups=(gnome-extra)
_commit=92706b42784e553d9f841117111a5e14bd201e1c  # tags/43.0^0
source=("git+https://gitlab.gnome.org/World/Endeavour.git#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd Endeavour
  git describe --tags | sed 's/^v//;s/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd Endeavour
}

build() {
  arch-meson Endeavour build
  meson compile -C build
}

check() (
  export GSETTINGS_SCHEMA_DIR="$PWD/Endeavour/data"
  glib-compile-schemas "$GSETTINGS_SCHEMA_DIR"

  meson test -C build --print-errorlogs
)

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
